import request from '@/utils/request'

// 查询用户关联，存储用户基本信息和康复情况列表
export function listRelationship(query) {
  return request({
    url: '/zuixia/relationship/list',
    method: 'get',
    params: query
  })
}

// 查询用户关联，存储用户基本信息和康复情况详细
export function getRelationship(userId) {
  return request({
    url: '/zuixia/relationship/' + userId,
    method: 'get'
  })
}

// 新增用户关联，存储用户基本信息和康复情况
export function addRelationship(data) {
  return request({
    url: '/zuixia/relationship',
    method: 'post',
    data: data
  })
}

// 修改用户关联，存储用户基本信息和康复情况
export function updateRelationship(data) {
  return request({
    url: '/zuixia/relationship',
    method: 'put',
    data: data
  })
}

// 删除用户关联，存储用户基本信息和康复情况
export function delRelationship(userId) {
  return request({
    url: '/zuixia/relationship/' + userId,
    method: 'delete'
  })
}
